'\" te
.\" Copyright (c) 2000 Sun Microsystems, Inc.,
.\" All Rights Reserved.
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH SETPGRP 1 "Jan 5, 2000"
.SH NAME
setpgrp \- set process group ID
.SH SYNOPSIS
.LP
.nf
\fBsetpgrp\fR \fIcommand\fR [\fIarg\fR]...
.fi

.SH DESCRIPTION
.sp
.LP
If the current process is not already a session leader, the \fBsetpgrp\fR
utility sets the process group \fBID\fR and session \fBID\fR to the current
process \fBID\fR and does an \fBexec()\fR of \fIcommand\fR and its argument(s),
if any.
.SH OPERANDS
.sp
.LP
The following operands are supported:
.sp
.ne 2
.na
\fB\fIcommand\fR\fR
.ad
.RS 11n
The name of a command to be invoked.
.RE

.sp
.ne 2
.na
\fB\fIarg\fR\fR
.ad
.RS 11n
An option or argument to \fIcommand\fR.
.RE

.SH EXIT STATUS
.sp
.LP
The following exit values are returned:
.sp
.ne 2
.na
\fB\fB1\fR\fR
.ad
.RS 5n
Error executing the \fBsetpgrp\fR utility or during \fBexec()\fR of
\fIcommand\fR.
.RE

.sp
.LP
Otherwise, the exit status will be that of \fIcommand\fR.
.SH SEE ALSO
.sp
.LP
.BR exec (2),
.BR setpgrp (2),
.BR attributes (7)
